<!DOCTYPE html>
<html>
<head>
    <title>Locahost is secure</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <script src="/resources/get-host-info.js"></script>
</head>
<body>
    <script>
        if (window.location.origin != get_host_info().HTTP_REMOTE_ORIGIN) {
            window.location = get_host_info().HTTP_REMOTE_ORIGIN +
                              window.location.pathname;
        } else {
            test(function () {
                assert_equals(document.location.hostname, "localhost", "Sanity check the test runner.");
                assert_true(window.isSecureContext);
            }, "localhost is secure.");
        }
    </script>
</body>
</html>
